#include <iostream>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "named_pipe.h"

using namespace std;

int main()
{
    int fd = open(pipe_path.c_str(), O_RDONLY);

    while (true)
    {
        char buf[1024] = {0};
        int n=read(fd, buf, sizeof(buf));
        sleep(1);
        cout << buf << endl;
    }

    return 0;
}